//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
    {
        //登录
        path: '/login',
        component: () => import('@/views/user/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
        },
    },
    {
        //登录成功以后展示数据的路由
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/admin/home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                },
            },
        ],
    },
    {
        //404
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            hidden: true,
            icon: 'DocumentDelete',
        },
    },
    {
        path: '/know',
        component: () => import('@/layout/index.vue'), // 一个只包 router-view 的空布局
        children: [
            {
                path: '',
                component: () => import('@/views/admin/home/index.vue'),
                meta: { title: '智慧检索', icon: 'Platform' }
            }
        ]
    },
    {
        path: '/screen',
        component: () => import('@/views/admin/screen/index.vue'),
        name: 'Screen',
        meta: {
            hidden: false,
            title: '数据大屏',
            icon: 'Platform',
        },
    },
    {
        path: '/heritage',
        component: () => import('@/layout/index.vue'),
        name: 'Product',
        meta: {
            title: '非遗管理',
            icon: 'Goods',
        },
        redirect: '/heritage/items',
        children: [
            {
                path: '/heritage/items',
                component: () => import('@/views/admin/heritage/items/index.vue'),
                name: 'items',
                meta: {
                    title: '非遗项目管理',
                    icon: 'ShoppingCartFull',
                },
            },
            {
                path: '/heritage/inheritor',
                component: () => import('@/views/admin/heritage/inheritor/index.vue'),
                name: 'inheritor',
                meta: {
                    title: '非遗传承人管理',
                    icon: 'ChromeFilled',
                },
            },
            {
                path: '/heritage/category',
                component: () => import('@/views/admin/heritage/category/index.vue'),
                name: 'category',
                meta: {
                    title: '非遗类别管理',
                    icon: 'Calendar',
                },
            },
            {
                path: '/heritage/resource',
                component: () => import('@/views/admin/heritage/resource/index.vue'),
                name: 'resource',
                meta: {
                    title: '非遗资源管理',
                    icon: 'Orange',
                },
            },
        ],
    },
    {
        path: '/organization',
        component: () => import('@/layout/index.vue'),
        name: 'Organization',
        meta: {
            title: '组织管理',
            icon: 'Lock',
        },
        redirect: '/organization/region',
        children: [
            {
                path: '/organization/region',
                component: () => import('@/views/admin/organization/region/index.vue'),
                name: 'region',
                meta: {
                    title: '地区管理',
                    icon: 'User',
                },
            },
            {
                path: '/organization/duty',
                component: () => import('@/views/admin/organization/duty/index.vue'),
                name: 'duty',
                meta: {
                    title: '机构管理',
                    icon: 'User',
                },
            },
        ],
    },

    {
        path: '/system',
        component: () => import('@/layout/index.vue'),
        name: 'System',
        meta: {
            title: '系统管理',
            icon: 'Lock',
        },
        redirect: '/system/user',
        children: [
            {
                path: '/system/user',
                component: () => import('@/views/admin/system/user/index.vue'),
                name: 'User',
                meta: {
                    title: '用户管理',
                    icon: 'User',
                },
            },
            {
                path: '/system/role',
                component: () => import('@/views/admin/system/roles/index.vue'),
                name: 'Role',
                meta: {
                    title: '角色管理',
                    icon: 'UserFilled',
                },
            },
            {
                path: '/system/permission',
                component: () => import('@/views/admin/system/permission/index.vue'),
                name: 'Permission',
                meta: {
                    title: '权限管理',
                    icon: 'Monitor',
                },
            },
            {
                path: '/system/dictionary',
                component: () => import('@/views/admin/system/dictionary/index.vue'),
                name: 'dictionary',
                meta: {
                    title: '字典管理',
                    icon: 'Monitor',
                },
            },
            {
                path: '/system/config',
                component: () => import('@/views/admin/system/sysconfig/index.vue'),
                name: 'config',
                meta: {
                    title: '系统配置',
                    icon: 'Monitor',
                },
            },
        ],
    },
]

//异步路由
export const asnycRoute = [

]

//任意路由
export const anyRoute = {
    //任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
        title: '任意路由',
        hidden: true,
        icon: 'DataLine',
    },
}
